{include file="public/header" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}
    {load href="__CSS__video-js.min.css"}
    {load href="__JS__video.min.js"}
<!-- 加载编辑器的容器 -->
{:ueditor()}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="form-group">
                <label class="col-sm-2 control-label">展示：</label>
                <div class="col-sm-9">
                    <div class="radio i-checks">
                        <label>
                            <input type="radio" value="0" name="is_hidden" {present name="name"}{eq name="name.is_hidden" value="0"}checked{/eq}{else/}checked{/present}>是
                        </label>
                        <label>
                            <input type="radio" value="1" name="is_hidden" {present name="name"}{eq name="name.is_hidden" value="1"}checked{/eq}{/present}>否
                        </label>
                    </div>
                </div>
            </div>
	        <div class="form-group">
	            <label class="col-sm-2 control-label">开始时间：</label>
	            <div class="col-sm-9">
	                <input name="start_time" type="text" id="start" class="form-control layui-input" value="{present name='name'}{$name.start_time}{/present}" autocomplete="off"  style="width: 30%;float: left;">
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-sm-2 control-label">结束时间：</label>
	            <div class="col-sm-9">
	                <input name="end_time" type="text" id="end" class="form-control layui-input" value="{present name='name'}{$name.end_time}{/present}" autocomplete="off"  style="width: 30%;float: left;">
	            </div>
	        </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">标题：</label>
                <div class="col-sm-9">
                    <input name="title" type="text" class="form-control" value="{present name='name'}{$name.title}{/present}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">封面：</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <img src="{present name='name.image'}{if condition='$name.image'}__ROOT__{$name.image}{else /}__IMG__add_img.png{/if}{else /}__IMG__add_img.png{/present}" id="imageimg" style="max-width: 200px">
                        <input name="image" type="hidden"  id="image" class="form-control" value="{present name='name'}{$name.image}{/present}">
                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-primary" id="tubiao">上传</button>
                                        </span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序：</label>
                <div class="col-sm-9">
                    <input name="sort" type="text" class="form-control" value="{present name='name'}{$name.sort}{/present}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">内容：</label>
                <div class="col-sm-9">
                    <textarea name="content" id="content" style="height: 400px;width: 100%">{present name="name"}{$name.content}{/present}</textarea>
                </div>
            </div>

    </div>
</div>
</div>
</div>
</form>
</div>
</div>
{include file="public/footer" /}
<script type="text/javascript">

    layui.use(['laydate'], function(){
        var laydate = layui.laydate;
        var form = layui.form;

        //执行一个laydate实例
        laydate.render({
            elem: '#start', //指定元素
            type : 'datetime',
            trigger: 'click'
        });
        laydate.render({
            elem: '#end', //指定元素
            type : 'datetime',
            trigger: 'click'
        });
    })


    $(document).ready(function(){
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        })
    });
    function msg(){
        layer.msg("上传成功")
    }

    function delImg(id){
        $('#id'+id).remove();
    }

</script>
{include file="public/bottom" /}

